<%@ Page PathInChannel="course/list{CategoryID:(_([^_\.]+)?)?}{Type:(_(VIDEO|AUDIO|TEXT)?)?}{Order:(_(\d+)?)?}{q:(_[^_\.]*)?}{Page}{Ext}"%>
<!doctype html>
<html lang="<%=PageLang%>"<%If PageLang == "UYG"%> class="rtl"<%EndIf%>>
<head>
<ali:List ID="Categorys" Mark="Course" Object="Category" Condition="IsDisplay=true" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
<title>课程列表</title>
<link rel="stylesheet" href="<%=CommonPath%>aliui/skin/default/ali.mobile.css">
<link rel="stylesheet" href="<%=CommonSkinPath%>css/common.css">
<link rel="stylesheet" href="<%=SkinPath%>css/common.css">
<script language="c#" runat="server">
protected string _categoryID = "NULL";
protected string CategoryID
{
	get
	{
		if (_categoryID != "NULL")
			return _categoryID;

		_categoryID = Request.QueryString["CategoryID"];
		if (String.IsNullOrEmpty(_categoryID) || _categoryID == "_")
		{
			_categoryID = null;
		}
		else
		{
			_categoryID = _categoryID.TrimStart('_');
			DataRow[] rows = Categorys.Select(AliCMS.CourseModule.Alias.Category.InnerID + "=" + _categoryID);
			if (rows.Length == 0)
				_categoryID = null;
			else
				_categoryID = rows[0][AliCMS.CourseModule.Alias.Category.InnerID].ToString();
		}
		
		return _categoryID;
	}
}

protected string CategoryName
{
	get
	{
		DataRow[] rows = Categorys.Select(AliCMS.CourseModule.Alias.Category.InnerID + "=" + CategoryID);
		return rows[0][AliCMS.CourseModule.Alias.Category.Name].ToString();
	}
}

protected string MediaType
{
	get
	{
		if (String.IsNullOrEmpty(Request.QueryString["Type"]) || Request.QueryString["Type"] == "_")
			return "";
		else
			return Request.QueryString["Type"].Substring(1);
	}
}

protected int Order
{
	get
	{
		if (String.IsNullOrEmpty(Request.QueryString["Order"]) || Request.QueryString["Order"] == "_")
			return 0;
		else
			return Convert.ToInt32(Request.QueryString["Order"].Substring(1));
	}
}

protected string Keyword
{
	get
	{
		if (String.IsNullOrEmpty(Request.QueryString["q"]) || Request.QueryString["q"] == "_")
			return "";
		else
			return Request.QueryString["q"].Substring(1);
	}
}
</script>
</head>
<body>
<div class="page tab1" id="course-list" data-path="<%=BuildUrl("course/ajax_list")%>" data-category-id="<%=CategoryID%>" data-type="<%=MediaType%>" data-order="<%=Order%>" data-tpl="<%=BuildUrl(null, "course/list", "CategoryID={CategoryID}&Type={Type}&Order={Order}&q={q}")%>" data-category-text="类别" data-type-text="类型" data-order-text="排序" data-loading="加载中..." data-has-read-all="已全部显示">
	<div class="tab1-content">
		<!-- start="标题栏" -->
		<div class="titlebar"><form action=""><input type="text" value="<%=Keyword%>" placeholder="关键词"><button type="submit"></button></form></div>
		<!-- end="标题栏" -->
		
		<!-- start="筛选菜单" -->
		<ul id="course-list-menu-bar">
			<li><%If CategoryID != null%><%=CategoryName%><%Else%>类别<%EndIf%></li>
			<li><%If MediaType == "VIDEO"%>视频<%ElseIf MediaType == "AUDIO"%>音频<%ElseIf MediaType == "TEXT"%>图文<%Else%>类型<%EndIf%></li>
			<li><%If Order == 1%>最新<%ElseIf Order == 2%>人气<%Else%>排序<%EndIf%></li>
		</ul>
		<!-- end="筛选菜单" -->
		
		<!-- start="类别菜单" -->
		<div id="course-list-category-menu">
			<ul>
				<li data-id="" class="active">全部</li>
				<ali:List Source="Categorys" Mark="Course" Object="Category" Condition="ParentChain='0'">
					<ali:Record>
						<li data-id="<%=InnerID%>">
							<a><%=Name%></a>
							<ali:List Source="Categorys" Mark="Course" Object="Category" Condition="ParentID=ID">
								<ol>
									<ali:Record>
										<li data-id="<%=InnerID%>"><%=Name%></li>
									</ali:Record>
								</ol>
							</ali:List>
						</li>
					</ali:Record>
				</ali:List>
			</ul>
			<ol>
				<li data-id="" class="active">全部</li>
			</ol>
		</div>
		<!-- end="类别菜单" -->
		
		<!-- start="类型菜单" -->
		<div id="course-list-type-menu">
			<ul>
				<li data-id="" class="active">全部</li>
				<li data-id="VIDEO">视频</li>
				<li data-id="AUDIO">音频</li>
				<li data-id="TEXT">图文</li>
			</ul>
		</div>
		<!-- end="类型菜单" -->
		
		<!-- start="排序菜单" -->
		<div id="course-list-sort-menu">
			<ul>
				<li data-id="" class="active">默认</li>
				<li data-id="1">最新</li>
				<li data-id="2">人气</li>
			</ul>
		</div>
		<!-- end="排序菜单" -->
		
		<!-- start="内容" -->
		<div class="tab1-body">
			<!-- start="列表" -->
			<ul class="list6">
				<li class="more"></li>
			</ul>
			<!-- end="列表" -->
		</div>
		<!-- end="内容" -->
	</div>	
	<ul class="tab1-bar">
		<li><a href="<%=BuildUrl("index")%>" class="tab1-home">首页</a></li>
		<li><a href="" class="tab1-list active">课程</a></li>
		<li><a href="<%=BuildUrl("user/index")%>" class="tab1-user">我的</a></li>
	</ul>
</div>
<script src="<%=CommonPath%>jquery/core3.js"></script>
<script src="<%=CommonPath%>jquery.lazyloadxt.js"></script>
<script src="<%=CommonPath%>aliui/ali.mobile.min.js"></script>
<script src="<%=JsPath%>common.js"></script>
</body>
</html>